import http from "@/utils/request";

//定义接口 请求首页的接口
 export const getData = () =>{
    //会返回一个 promise 对象
    return http.get('/home/getData')//后端提供的接口
 }
 export const getUser = (params) =>{
   return http.get('/user/getUser',{params})
 }
 export const addUser = (data) => {
   return http.post ('/user/add',data)
 }
 export const editUser = (data) => {
   return http.post('/user/edit',data)
 }
 export const delUser = (data) => {
   return http.post('/user/del',data)
 }
 export const getMenu = (data) =>{
  return http.post('/permission/getMenu',data)
 }